package com.ocom.wxapi.client;

import com.alibaba.fastjson.JSONObject;
import com.ocom.common.constant.UnifiendPayUrl;
import com.ocom.common.request.web.CashDailyRequest;
import com.ocom.common.request.web.GetConsPerReportsRequest;
import com.ocom.common.resp.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@Component
@FeignClient(value = "xfrecode")
public interface XfRecordFeign {

    @PostMapping(UnifiendPayUrl.URL_getConsumeDetail)
    Result getConsumeDetail(@RequestBody JSONObject jsonObject);

    @PostMapping(UnifiendPayUrl.URL_getConsumeReports)
    Result getConsumeReports(@RequestBody JSONObject jsonObject);

    //钱包余额
    @PostMapping(UnifiendPayUrl.URL_walletBalance)
    public Result walletBalance(@RequestParam("comId")Long comId,@RequestParam("month") String month);

    //补贴钱包日报
    @PostMapping(UnifiendPayUrl.URL_subsidyDaily)
    public Result subsidyDaily(@RequestParam("comId")Long comId,@RequestParam("endDate")String endDate);

    //现金钱包日报表
    @PostMapping(UnifiendPayUrl.URL_rechargeDaily)
    public Result rechargeDaily(@RequestParam("comId")Long comId,@RequestParam("endDate")String endDate);

    //现金月报
    @PostMapping(UnifiendPayUrl.URL_cashMonthly)
    public Result cashMonthly(@RequestParam("comId") Long comId,@RequestParam("endDate") String endDate);

    //现金日报
    @PostMapping(UnifiendPayUrl.URL_cashDaily)
    public Result cashDaily(@RequestBody CashDailyRequest cashDailyRequest);

    @PostMapping(UnifiendPayUrl.URL_merchMonthly)
    public Result merchMonthly(@RequestParam("comId") Long comId,@RequestParam("endDate") String endDate);

    //商户消费日报
    @PostMapping(UnifiendPayUrl.URL_merchDaily)
    public Result merchDaily(@RequestParam("comId") Long comId,@RequestParam("endDate") String endDate,@RequestParam("merchId")Integer merchId);

    //人员消费汇总报表
    @PostMapping(UnifiendPayUrl.URL_getConsPerReports)
    public Result getConsPerReports(@RequestBody GetConsPerReportsRequest getConsPerReportsRequest);

    @PostMapping(UnifiendPayUrl.URL_getPointIdByNameFromRecord)
    public Result getPointIdByNameFromRecord(JSONObject jsonObject);

}
